package id.co.rho.scoring.cid.shared.domain;

import java.io.Serializable;

/**
 * User: bungrudi
 * Date: 10/21/11
 * Time: 5:40 PM
 */
public class RefError implements Serializable {
    private String directRef;
    private String rootRef;

    public RefError() {
    }

    public RefError(String directRef, String rootRef) {
        this.directRef = directRef;
        this.rootRef = rootRef;
    }

    public String getDirectRef() {
        return directRef;
    }

    public void setDirectRef(String directRef) {
        this.directRef = directRef;
    }

    public String getRootRef() {
        return rootRef;
    }

    public void setRootRef(String rootRef) {
        this.rootRef = rootRef;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        RefError refError = (RefError) o;

        if (!directRef.equals(refError.directRef)) return false;
        if (!rootRef.equals(refError.rootRef)) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = directRef.hashCode();
        result = 31 * result + rootRef.hashCode();
        return result;
    }
}
